import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/editable_text.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';

import '../../../config/GlobalConfig.dart';

class ScanPageState {

  EasyRefreshController controller = EasyRefreshController();

  TextEditingController searchController = TextEditingController();

  bool isReadOnly = true;
  /// 当前页
  int pageNum = 1;
  /// 页码
  int pageSize = 1000;
  /// 是否还有更多，默认还有false
  bool noMore = false;
  /// 数据集合
  List<dynamic> dataList = [];

  ScanPageState() {
    var map = Get.arguments;
    if (map["pageData"] != null ) {
      String temp = map['pageData'];
      if(temp.isNotEmpty){
        dataList = map["pageData"].split(",");
      }
    }
    if (map["isReadOnly"] != null ) {
      isReadOnly = map["isReadOnly"];
    }
  }
}
